//
//  TTAFTClient.h
//  ShanbeiIpad
//
//  Created by 涛 田 on 12-7-23.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "AFHTTPClient.h"

@interface TTAFTClient : AFHTTPClient

+ (TTAFTClient *)initClient;

- (void)postPath:(NSString *)path
      parameters:(NSDictionary *)parameters
   md5ValueArray:(NSArray *)valueArray
         success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
         failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

- (void)postPath:(NSString *)path
      parameters:(NSDictionary *)parameters
         success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
         failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

- (void)getPath:(NSString *)path
     parameters:(NSDictionary *)parameters
        success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
        failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method
                                                   path:(NSString *)path
                                          md5ValueArray:(NSArray *)valueArray
                                             parameters:(NSDictionary *)parameters
                              constructingBodyWithBlock:(void (^)(id <AFMultipartFormData>formData))block;

- (void)HTTPRequestOperationWithRequest:(NSURLRequest *)urlRequest
                               delegate:(id)delegate
                                success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
                                failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

- (void)HTTPRequestOperationWithUrl:(NSURL *)url
                           delegate:(id)delegate
                            success:(void (^)(AFHTTPRequestOperation *, id))success
                            failure:(void (^)(AFHTTPRequestOperation *, NSError *))failure;
@end
